home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / New System Software Extensions / OpenDoc A6 / SOM / OpenDoc and SOM / CPlusPlus / FocusSet.xh < prev    next >
Encoding:
Text File  |  1994-04-19  |  4.0 KB  |  185 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: Locrian:WWDCSun:CPlusPlus:FocusSet.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: somc/smemit.c
  7.  *     SOM Emitter emitxh.dll: somc/smmain.c
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *  Classes defined in this interface
  13.  * 
  14.  */
  15.  
  16.  
  17. #ifndef SOM_ODFocusSet_xh
  18. #define SOM_ODFocusSet_xh
  19.  
  20. class ODFocusSet;
  21.  
  22. #define ODFocusSet_MajorVersion 0
  23. #define ODFocusSet_MinorVersion 0
  24.  
  25. /* C++ som defs */
  26. #include <somcls.xh>
  27.  
  28. /* Include C++ parent defs */
  29. #ifndef SOM_ODObject_xh
  30. #include <ODObject.xh>
  31. #endif
  32.  
  33. #ifndef ODFocusSet_API
  34. #define ODFocusSet_API
  35. /*
  36.  * -- The Class API
  37.  */
  38.  
  39. /*
  40.  * Start of user-defined types:
  41.  */
  42. class ODExtension;
  43. class ODFocusSetIterator;
  44.  
  45. /*
  46.  * End of user-defined types.
  47.  */
  48.  
  49. #if applec ^ PRAGMA_LIB_EXPORT
  50. #pragma lib_export on
  51. #endif
  52.  
  53.  
  54. /* A procedure to create the ODFocusSet Class */
  55. SOMEXTERN SOMClass * SOMLINK ODFocusSetNewClass(
  56.         integer4 majorVersion,
  57.         integer4 minorVersion);
  58.  
  59. /* The API to the ODFocusSet class object, and the methods it introduces. */
  60. typedef struct ODFocusSetClassDataStructure {
  61.     SOMClass *classObject;
  62.     somMToken InitFocusSet;
  63.     somMToken Add;
  64.     somMToken Remove;
  65.     somMToken Contains;
  66.     somMToken CreateIterator;
  67.     somMToken GetImplementation;
  68. } ODFocusSetClassDataStructure;
  69. #ifdef SOM_NO_DATA_EXPORTS
  70.    SOMEXTERN ODFocusSetClassDataStructure * ODFocusSetGetClassData ( void );
  71. #   undef ODFocusSetClassData
  72. #   define ODFocusSetClassData (*ODFocusSetGetClassData())
  73. #else
  74.    SOMEXTERN ODFocusSetClassDataStructure ODFocusSetClassData;
  75. #endif /* SOM_NO_DATA_EXPORTS */
  76.  
  77. #if applec ^ PRAGMA_LIB_EXPORT
  78. #pragma lib_export off
  79. #endif
  80.  
  81. #define _ODFocusSet ODFocusSetClassData.classObject
  82.  
  83. /* The API to parentMtabs for ODFocusSet, and the instance data it introduces. */
  84. SOMEXTERN struct ODFocusSetCClassDataStructure {
  85.     somMethodTabs parentMtab;
  86.     somDToken instanceDataToken;
  87. } ODFocusSetCClassData;
  88.  
  89. /*
  90.  * -- Typedefs for Procedures that support Methods introduced by ODFocusSet
  91.  */
  92. SOMEXTERN {
  93. typedef void   (* SOMLINK somTD_ODFocusSet_InitFocusSet)(ODFocusSet *somSelf, Environment *ev);
  94. typedef void   (* SOMLINK somTD_ODFocusSet_Add)(ODFocusSet *somSelf, Environment *ev,
  95.         ODTypeToken focus);
  96. typedef void   (* SOMLINK somTD_ODFocusSet_Remove)(ODFocusSet *somSelf, Environment *ev,
  97.         ODTypeToken focus);
  98. typedef ODBoolean   (* SOMLINK somTD_ODFocusSet_Contains)(ODFocusSet *somSelf, Environment *ev,
  99.         ODTypeToken focus);
  100. typedef ODFocusSetIterator*   (* SOMLINK somTD_ODFocusSet_CreateIterator)(ODFocusSet *somSelf, Environment *ev);
  101. }
  102.  
  103. #endif /* ODFocusSet_API */
  104.  
  105.  
  106. /*
  107.  * -- Method Tokens are Thunks
  108.  */
  109. #undef somresolve_
  110. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  111.  
  112. /*
  113.  * -- The C++ Wrapper Class for ODFocusSet
  114.  */
  115. class ODFocusSet : public ODObject
  116. {
  117. public:
  118.  
  119. void *operator new(size_t size)
  120. {
  121.    SOM_IgnoreWarning(size);
  122.    if (!ODFocusSetClassData.classObject) 
  123.       ODFocusSetNewClass(ODFocusSet_MajorVersion,ODFocusSet_MinorVersion);
  124.    return (void *)
  125.       ((somTD_SOMClass_somNew)
  126.       somresolve_((SOMObject *)((void*)(ODFocusSetClassData.classObject)),
  127.                  SOMClassClassData.somNew))
  128.          ((SOMClass *)((void*)(ODFocusSetClassData.classObject)));
  129. }
  130.  
  131. void operator delete(void * obj)
  132. {
  133.    ((SOMObject *)obj)->somFree();
  134. }
  135.  
  136. /* public method: InitFocusSet */
  137. void   InitFocusSet(Environment *ev)
  138. {
  139.    SOM_Resolve(this,ODFocusSet,InitFocusSet)
  140.     (this,ev);
  141. }
  142.  
  143.  
  144. /* public method: Add */
  145. void   Add(Environment *ev,
  146.         ODTypeToken focus)
  147. {
  148.    SOM_Resolve(this,ODFocusSet,Add)
  149.     (this,ev,focus);
  150. }
  151.  
  152.  
  153. /* public method: Remove */
  154. void   Remove(Environment *ev,
  155.         ODTypeToken focus)
  156. {
  157.    SOM_Resolve(this,ODFocusSet,Remove)
  158.     (this,ev,focus);
  159. }
  160.  
  161.  
  162. /* public method: Contains */
  163. ODBoolean   Contains(Environment *ev,
  164.         ODTypeToken focus)
  165. {
  166.    return SOM_Resolve(this,ODFocusSet,Contains)
  167.     (this,ev,focus);
  168. }
  169.  
  170.  
  171. /* public method: CreateIterator */
  172. ODFocusSetIterator*   CreateIterator(Environment *ev)
  173. {
  174.    return SOM_Resolve(this,ODFocusSet,CreateIterator)
  175.     (this,ev);
  176. }
  177.  
  178.  
  179.  
  180. };   /* ODFocusSet */
  181.  
  182.  
  183.  
  184. #endif       /* SOM_ODFocusSet_xh */
  185.